﻿<UserControl x:Class="BHYT.UC.ucRichEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <UserControl.Resources>
        <ResourceDictionary>
            <dxre:RichEditUICommand x:Key="commands" />
            <dxre:RichEditStringIdConverter x:Key="stringIdConverter" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <dxb:BarManager Name="barManager1" ToolbarGlyphSize="Small">
            <dxb:BarManager.Bars>
                <dxb:Bar Caption="{Binding Source={StaticResource stringIdConverter}, ConverterParameter=Caption_GroupClipboard, Converter={StaticResource stringIdConverter}, Mode=OneTime}" Name="barClipboard">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="biEditPaste" />
                        <dxb:BarButtonItemLink BarItemName="biEditCut" />
                        <dxb:BarButtonItemLink BarItemName="biEditCopy" />
                        <dxb:BarButtonItemLink BarItemName="biEditPasteSpecial" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
                <dxb:Bar Caption="{Binding Source={StaticResource stringIdConverter}, ConverterParameter=Caption_GroupFont, Converter={StaticResource stringIdConverter}, Mode=OneTime}" Name="barFont">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarEditItemLink BarItemName="biFormatFontName" />
                        <dxb:BarEditItemLink BarItemName="biFormatFontSize" />
                        <dxb:BarButtonItemLink BarItemName="biFormatIncreaseFontSize" />
                        <dxb:BarButtonItemLink BarItemName="biFormatDecreaseFontSize" />
                        <dxb:BarButtonItemLink BarItemName="biFormatClearFormatting" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontBold" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontItalic" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontUnderline" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontDoubleUnderline" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontStrikeout" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontDoubleStrikeout" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontSuperscript" />
                        <dxb:BarCheckItemLink BarItemName="biFormatFontSubscript" />
                        <dxb:BarSubItemLink BarItemName="biEditChangeCase" />
                        <dxre:BarSplitButtonColorEditItemLink BarItemName="biFormatFontBackColor" />
                        <dxre:BarSplitButtonColorEditItemLink BarItemName="biFormatFontForeColor" />
                        <dxb:BarButtonItemLink BarItemName="biFormatFont" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
                <dxb:Bar Caption="{Binding Source={StaticResource stringIdConverter}, ConverterParameter=Caption_GroupParagraph, Converter={StaticResource stringIdConverter}, Mode=OneTime}" Name="barParagraph">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarCheckItemLink BarItemName="biFormatBulletedList" />
                        <dxb:BarCheckItemLink BarItemName="biFormatNumberingList" />
                        <dxb:BarCheckItemLink BarItemName="biFormatMultilevelList" />
                        <dxb:BarButtonItemLink BarItemName="biFormatDecreaseIndent" />
                        <dxb:BarButtonItemLink BarItemName="biFormatIncreaseIndent" />
                        <dxb:BarCheckItemLink BarItemName="biViewShowWhitespace" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignLeft" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignCenter" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignRight" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignJustify" />
                        <dxb:BarSubItemLink BarItemName="biFormatParagraphLineSpacing" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraph" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
                <dxb:Bar Caption="{Binding Source={StaticResource stringIdConverter}, ConverterParameter=Caption_GroupStyles, Converter={StaticResource stringIdConverter}, Mode=OneTime}" Name="barStyles">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarEditItemLink BarItemName="biFormatFontStyle" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
                <dxb:Bar Caption="{Binding Source={StaticResource stringIdConverter}, ConverterParameter=Caption_GroupEditing, Converter={StaticResource stringIdConverter}, Mode=OneTime}" Name="barEditing">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="biEditFind" />
                        <dxb:BarButtonItemLink BarItemName="biEditReplace" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
            </dxb:BarManager.Bars>
            <dxb:BarManager.Items>
                <dxb:BarButtonItem Command="{Binding Path=EditPaste, Mode=OneTime, Source={StaticResource commands}}" Name="biEditPaste" />
                <dxb:BarButtonItem Command="{Binding Path=EditCut, Mode=OneTime, Source={StaticResource commands}}" Name="biEditCut" />
                <dxb:BarButtonItem Command="{Binding Path=EditCopy, Mode=OneTime, Source={StaticResource commands}}" Name="biEditCopy" />
                <dxb:BarButtonItem Command="{Binding Path=EditPasteSpecial, Mode=OneTime, Source={StaticResource commands}}" Name="biEditPasteSpecial" />
                <dxb:BarEditItem Command="{Binding Path=FormatFontName, Mode=OneTime, Source={StaticResource commands}}" Content="" EditWidth="150" Name="biFormatFontName">
                    <dxb:BarEditItem.EditSettings>
                        <dxre:FontComboBoxEditSettings />
                    </dxb:BarEditItem.EditSettings>
                </dxb:BarEditItem>
                <dxb:BarEditItem Command="{Binding Path=FormatFontSize, Mode=OneTime, Source={StaticResource commands}}" Content="" EditWidth="50" Name="biFormatFontSize">
                    <dxb:BarEditItem.EditSettings>
                        <dxre:RichEditFontSizeComboBoxEditSettings RichEditControl="{Binding ElementName=richEditControl1}" />
                    </dxb:BarEditItem.EditSettings>
                </dxb:BarEditItem>
                <dxb:BarButtonItem Command="{Binding Path=FormatIncreaseFontSize, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatIncreaseFontSize" />
                <dxb:BarButtonItem Command="{Binding Path=FormatDecreaseFontSize, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatDecreaseFontSize" />
                <dxb:BarButtonItem Command="{Binding Path=FormatClearFormatting, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatClearFormatting" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontBold, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontBold" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontItalic, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontItalic" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontUnderline, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontUnderline" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontDoubleUnderline, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontDoubleUnderline" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontStrikeout, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontStrikeout" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontDoubleStrikeout, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontDoubleStrikeout" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontSuperscript, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontSuperscript" />
                <dxb:BarCheckItem Command="{Binding Path=FormatFontSubscript, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontSubscript" />
                <dxb:BarSubItem Command="{Binding Path=EditChangeCase, Mode=OneTime, Source={StaticResource commands}}" Name="biEditChangeCase">
                    <dxb:BarSubItem.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="biEditMakeUpperCase" />
                        <dxb:BarButtonItemLink BarItemName="biEditMakeLowerCase" />
                        <dxb:BarButtonItemLink BarItemName="biEditToggleCase" />
                    </dxb:BarSubItem.ItemLinks>
                </dxb:BarSubItem>
                <dxb:BarButtonItem Command="{Binding Path=EditMakeUpperCase, Mode=OneTime, Source={StaticResource commands}}" Name="biEditMakeUpperCase" />
                <dxb:BarButtonItem Command="{Binding Path=EditMakeLowerCase, Mode=OneTime, Source={StaticResource commands}}" Name="biEditMakeLowerCase" />
                <dxb:BarButtonItem Command="{Binding Path=EditToggleCase, Mode=OneTime, Source={StaticResource commands}}" Name="biEditToggleCase" />
                <dxre:BarSplitButtonColorEditItem Command="{Binding Path=FormatFontBackColor, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontBackColor">
                    <dxre:BarSplitButtonColorEditItem.PopupControl>
                        <dxb:PopupControlContainerInfo>
                            <dx:ThemedUserControl>
                                <dxe:ColorEdit ChipMargin="5" ChipSize="Large" ColumnCount="5" EditValue="{Binding ElementName=biFormatFontBackColor, Mode=TwoWay, Path=EditValue}" ShowDefaultColorButton="False" ShowMoreColorsButton="False" ShowNoColorButton="True">
                                    <dxe:ColorEdit.Palettes>
                                        <dxre:CharactersBackgroundColorPaletteCollection />
                                    </dxe:ColorEdit.Palettes>
                                </dxe:ColorEdit>
                            </dx:ThemedUserControl>
                        </dxb:PopupControlContainerInfo>
                    </dxre:BarSplitButtonColorEditItem.PopupControl>
                </dxre:BarSplitButtonColorEditItem>
                <dxre:BarSplitButtonColorEditItem Command="{Binding Path=FormatFontForeColor, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFontForeColor">
                    <dxre:BarSplitButtonColorEditItem.PopupControl>
                        <dxb:PopupControlContainerInfo>
                            <dx:ThemedUserControl>
                                <dxe:ColorEdit EditValue="{Binding ElementName=biFormatFontForeColor, Mode=TwoWay, Path=EditValue}" />
                            </dx:ThemedUserControl>
                        </dxb:PopupControlContainerInfo>
                    </dxre:BarSplitButtonColorEditItem.PopupControl>
                </dxre:BarSplitButtonColorEditItem>
                <dxb:BarButtonItem Command="{Binding Path=FormatFont, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatFont" />
                <dxb:BarCheckItem Command="{Binding Path=FormatBulletedList, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatBulletedList" />
                <dxb:BarCheckItem Command="{Binding Path=FormatNumberingList, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatNumberingList" />
                <dxb:BarCheckItem Command="{Binding Path=FormatMultilevelList, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatMultilevelList" />
                <dxb:BarButtonItem Command="{Binding Path=FormatDecreaseIndent, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatDecreaseIndent" />
                <dxb:BarButtonItem Command="{Binding Path=FormatIncreaseIndent, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatIncreaseIndent" />
                <dxb:BarCheckItem Command="{Binding Path=ViewShowWhitespace, Mode=OneTime, Source={StaticResource commands}}" Name="biViewShowWhitespace" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphAlignLeft, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAlignLeft" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphAlignCenter, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAlignCenter" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphAlignRight, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAlignRight" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphAlignJustify, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAlignJustify" />
                <dxb:BarSubItem Command="{Binding Path=FormatParagraphLineSpacing, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphLineSpacing">
                    <dxb:BarSubItem.ItemLinks>
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingSingle" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingSesquialteral" />
                        <dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingDouble" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraphLineSpacingCustomize" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraphAddSpacingBefore" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraphRemoveSpacingBefore" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraphAddSpacingAfter" />
                        <dxb:BarButtonItemLink BarItemName="biFormatParagraphRemoveSpacingAfter" />
                    </dxb:BarSubItem.ItemLinks>
                </dxb:BarSubItem>
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphLineSpacingSingle, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphLineSpacingSingle" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphLineSpacingSesquialteral, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphLineSpacingSesquialteral" />
                <dxb:BarCheckItem Command="{Binding Path=FormatParagraphLineSpacingDouble, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphLineSpacingDouble" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraphLineSpacingCustomize, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphLineSpacingCustomize" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraphAddSpacingBefore, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAddSpacingBefore" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraphRemoveSpacingBefore, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphRemoveSpacingBefore" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraphAddSpacingAfter, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphAddSpacingAfter" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraphRemoveSpacingAfter, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraphRemoveSpacingAfter" />
                <dxb:BarButtonItem Command="{Binding Path=FormatParagraph, Mode=OneTime, Source={StaticResource commands}}" Name="biFormatParagraph" />
                <dxb:BarEditItem Command="{Binding Path=FormatFontStyle, Mode=OneTime, Source={StaticResource commands}}" Content="" EditWidth="150" Name="biFormatFontStyle">
                    <dxb:BarEditItem.EditSettings>
                        <dxre:RichEditStyleComboBoxEditSettings RichEditControl="{Binding ElementName=richEditControl1}" />
                    </dxb:BarEditItem.EditSettings>
                </dxb:BarEditItem>
                <dxb:BarButtonItem Command="{Binding Path=EditFind, Mode=OneTime, Source={StaticResource commands}}" Name="biEditFind" />
                <dxb:BarButtonItem Command="{Binding Path=EditReplace, Mode=OneTime, Source={StaticResource commands}}" Name="biEditReplace" />
            </dxb:BarManager.Items>
            <dxre:RichEditControl Name="txtContent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BarManager="{Binding ElementName=barManager1, Mode=OneTime}" />
        </dxb:BarManager>
    </Grid>
</UserControl>
